Skip to content

Comments

Fixes for 7.0.3#4469

Merged
jorbuedo merged 2 commits intodevelopfrom
fixes-for-7.0.3
Feb 3, 2026
Merged

Fixes for 7.0.3#4469
jorbuedo merged 2 commits intodevelopfrom
fixes-for-7.0.3

Conversation

@jorbuedo
Copy link
Contributor

@jorbuedo jorbuedo commented Feb 3, 2026

https://emurgo.atlassian.net/browse/WAL-32


Note

Medium Risk
Changes how deep links and pending actions are deduplicated, which could alter when link actions execute (or get skipped) in edge cases around app restart, login, and wallet selection.

Overview
Reduces duplicate deep-link handling by tracking processed URLs in useDeepLinkWatcher (for both initial URL on cold start and the post-login recheck) so the same URL isn’t re-parsed and re-queued multiple times.

Simplifies ActionHandler’s pending-action deduping from an actionId -> action object map to an actionId set, and updates the processing gate to skip already-seen IDs. ClaimActionHandler similarly switches to a set keyed by url:code so claim links aren’t re-applied on screen refocus.

Fixes Counter text rendering to always include a leading space before optional unitsText/closingText when present.

Written by Cursor Bugbot for commit c562c76. This will update automatically on new commits. Configure here.

The Counter component was concatenating counter, unitsText, and
closingText without spaces, resulting in text like "3565Tokensfound"
instead of "3565 Tokens found".
The deep link watcher was re-processing the same initial URL when
the processLink callback reference changed during navigation. This
caused a loop where users were sent back to the start of the Send
flow repeatedly.

Added URL-based tracking using a Set ref to prevent re-processing
the same URL. Also simplified ActionHandler and ClaimActionHandler
to use the same consistent Set-based pattern instead of fragile
object reference comparisons.
@jorbuedo jorbuedo requested review from Nebyt and rahulnr7 February 3, 2026 12:56
@jorbuedo jorbuedo self-assigned this Feb 3, 2026
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.97%. Comparing base (f922c87) to head (c562c76).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #4469   +/-   ##
========================================
  Coverage    21.97%   21.97%           
========================================
  Files         1412     1412           
  Lines        36193    36183   -10     
  Branches      8177     8169    -8     
========================================
  Hits          7953     7953           
+ Misses       27636    27626   -10     
  Partials       604      604           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

})
if (isWebCardanoLink(url)) {
try {
processedUrlsRef.current.add(url)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL marked processed before parsing can fail

Medium Severity

In checkInitialUrlAfterLogin, the URL is added to processedUrlsRef before parseCardanoLink(url) is called. Since parseCardanoLink can throw errors (e.g., SchemeNotImplemented, ParamsValidationFailed, UnknownContent), if parsing fails the URL remains marked as processed and the user cannot retry. This contrasts with Yoroi link handling where the URL is only marked processed after successful parsing.

Fix in Cursor Fix in Web

const url = await Linking.getInitialURL()
if (url !== null) {
if (url !== null && !processedUrlsRef.current.has(url)) {
processedUrlsRef.current.add(url)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial URL marked processed before processing can fail

Medium Severity

In the "app is closed - check initial URL on mount" effect, the URL is added to processedUrlsRef on line 78 before processLink(url) is called on line 79. The processLink function can fail silently when parsing Cardano links (errors are caught and logged internally). If processing fails, the URL remains in the processed set and cannot be retried during the app session.

Fix in Cursor Fix in Web

const {reset: resetClaimState, scanActionClaimChanged, address} = useClaim()
const processedActionRef = React.useRef<Links.CardanoActionClaim | null>(null)
// Track processed claim URLs to prevent re-processing
const processedClaimUrlsRef = React.useRef<Set<string>>(new Set())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing cleanup for processed claims prevents retry

Medium Severity

The processedClaimUrlsRef Set is never cleared, unlike ActionHandler which clears its processedActionsRef when pendingAction becomes null. Once a claim is added to this Set, it cannot be re-triggered during the component's lifecycle, even if the claim fails downstream or is cancelled. Users would need to navigate away (unmounting the component) to retry the same claim.

Fix in Cursor Fix in Web

@jorbuedo jorbuedo merged commit 05347e7 into develop Feb 3, 2026
6 of 7 checks passed
@jorbuedo jorbuedo deleted the fixes-for-7.0.3 branch February 3, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants